<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>个人信息</title>
		<link rel="stylesheet" type="text/css" href="css/public.css"/>
		<link rel="stylesheet" type="text/css" href="css/mygxin.css" />
		<script src="X-admin/lib/layui/layui.js"></script>
		<script src="X-admin/js/jquery.js"></script>
		<script src="X-admin/js/xadmin.js"></script>
		<link rel="stylesheet" href="X-admin/css/xadmin.css">
		<script src="js/common.js"></script>
<!--		<script src="js/zou-lessors-nav.js"></script>-->
	</head>
	<body>
		<!------------------------------head------------------------------>
		<div class="head" id="top"></div>
		<!------------------------------idea------------------------------>
		<div class="address mt" id="add">
			<div class="wrapper clearfix">
				<a href="index.html" class="fl">首页</a>
				<span>/</span>
				<a href="lessors-mygrxx.html" class="on">个人中心</a>
			</div>
		</div>
		
		<!------------------------------Bott------------------------------>
		<div class="Bott">
			<div class="wrapper clearfix">
				<div class="zuo fl">
					<h3>
						<a href="#"><img src="img/default.jpeg" id="zuo-head" style="width: 120px;height: 120px;border-radius:60%"></a>
						<p class="clearfix"><span class="fl" id="name">[羊羊羊]</span><span class="fr">[退出登录]</span></p>
					</h3>

					<ul class="layui-nav layui-nav-tree" lay-filter="test">
						<li class="layui-nav-item">
							<a href="javascript:;" style="color: black;font-weight: bold">帐户管理</a>
							<dl class="layui-nav-child">
								<dd><a href="lessors-mygrxx.html">个人信息</a></dd>
								<dd><a href="lessors-remima.html">修改密码</a></dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;" style="color: black;font-weight: bold">财务中心</a>
							<dl class="layui-nav-child">
								<dd><a href="lessors-fiance.html">财务细明</a></dd>
								<dd><a href="lessors-fiance-dailyList.html">日报</a></dd>
								<dd><a href="lessors-fiance-monthlyList.html">月报</a></dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;" style="color: black;font-weight: bold">个人中心</a>
							<dl class="layui-nav-child">
								<dd><a href="lessors-station.html">我的工位</a></dd>
								<dd><a href="lessors-order-completed.html">工位订单</a></dd>
								<dd><a href="lessors-mygxin.html">我的活动</a></dd>
							</dl>
						</li>
					</ul>

				</div>
				<div class="you fl">
					<div class="tx clearfix">
						<div class="fl clearfix">
							<a href="#" class="fl"><img src="img/default.jpeg" id="you-head" style="width: 120px;height: 120px;border-radius:60%"/></a>
							<p class="fl"><span id="userna"></span><a href="lessors-mygrxx.html">修改个人信息></a></p>
						</div>
						<div class="fr" id="emails"></div>
					</div>
					<div class="layui-card-body ">
						<form class="layui-form layui-col-space5">
							<div class="layui-inline layui-show-xs-block">
								<input type="text" id="orcode" placeholder="订单号" autocomplete="off" class="layui-input">
							</div>
							<div class="layui-inline layui-show-xs-block">
								<input type="text" id="stname" placeholder="工位名称" autocomplete="off" class="layui-input">
							</div>
							<div class="layui-inline layui-show-xs-block">
								<input type="text" id="daily" placeholder="日报日期" autocomplete="off" class="layui-input">
							</div>
							<div class="layui-inline layui-show-xs-block">
								<button class="layui-btn" lay-submit="" lay-filter="sreach">
									<i class="layui-icon"><--</i></button>
							</div>
						</form>

						<table id="commentList" lay-filter="test" style="text-align: center">

						</table>
						<script type="text/html" id="barDemo">
							<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
						</script>
					</div>
				</div>
			</div>
		</div>

		<!--返回顶部-->
		<div class="gotop">
			<a href="cart.html">
			<dl>
				<dt><img src="img/gt1.png"/></dt>
				<dd>去购<br />物车</dd>
			</dl>
			</a>
			<a href="#" class="dh">
			<dl>
				<dt><img src="img/gt2.png"/></dt>
				<dd>联系<br />客服</dd>
			</dl>
			</a>
			<a href="lessors-mygrxx.html">
			<dl>
				<dt><img src="img/gt3.png"/></dt>
				<dd>个人<br />中心</dd>
			</dl>
			</a>
			<a href="#" class="toptop" style="display: none">
			<dl>
				<dt><img src="img/gt4.png"/></dt>
				<dd>返回<br />顶部</dd>
			</dl>
			</a>
			<p>400-800-8200</p>
		</div>
		<div class="footer" id="foot"></div>


		<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/user.js" type="text/javascript" charset="utf-8"></script>

	</body>

	<script>
		var Address_Prefix_Lessors = "http://localhost:9200/api-lessors";
		$(function () {
			start();
			//设置名称
			var data = JSON.parse(sessionStorage.getItem('data'));
			$("#name").html(data.buname); 	   	   //名称
			//设置头像
			$("#zuo-head").attr("src", data.buhead);
			$("#you-head").attr("src", data.buhead);
		});


		function start() {
			layui.use(['table', 'form','laydate'], function () {
				var table = layui.table;
				var form = layui.form;
				var laydate = layui.laydate;
				var date = new Date();
				$("#daily").val(date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate());
				//执行一个laydate实例
				laydate.render({
					elem: '#daily' //指定元素
					,ready: function(date) {
						console.log(date); //得到初始的日期时间对象：{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
					}
				});
				getRender();

				// 模糊查询----监听查询按钮
				form.on('submit(sreach)', function () {
					getRender();
					return false;
				});
			});
		}


		function getRender(){
			layui.use(['table'], function () {
				var table = layui.table;
				table.render({
					elem: '#commentList',
					url: Address_Prefix_Lessors+"/business/finance/dailyList",
					where: {
						busiid: sessionStorage.getItem("busiid"),
						orcode: $("#orcode").val(),
						stname: $("#stname").val(),
						uptime: $("#daily").val()
					},
					parseData: function (res) {
						return {
							"code": 0,
							"msg": "",
							"count": res.data.total,
							"data": res.data.list
						}
					}
					, page: true//开启分页
					, cellMinWidth: 80
					,totalRow: true
					, cols: [[
						{field: 'finaid', title: '财务ID', width: 100,fixed: 'left', unresize: true, sort: true, totalRowText: '合计'},
						{field: 'usname', title: '用户姓名'},
						{field: 'orcode', title: '订单号'},
						{field: 'stname', title: '工位名称'},
						{field: 'letime', title: '租赁时长'},
						{field: 'uptime', title: '时间'},
						{field: 'prices', title: '金额',sort: true, totalRow: true}
						// {fixed: 'right', title: '操作', width: 50, align: 'center', toolbar: '#barDemo'}
					]]
				});
			});
		}


	</script>
</html>
